﻿namespace Future.Model.ViewModel
{
    /// <summary>
    /// 描述：vue菜单路由展示模型
    /// 创建人： yangkai
    /// 创建时间：2022/11/16 17:47:25
    /// </summary>
    public class VueRouterVo
    {
        /// <summary>
        /// 主键
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 父节点
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int OrderNum { get; set; }

        /// <summary>
        /// 菜单组件路由
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 菜单组件路由
        /// </summary>
        public string Path { get; set; } = string.Empty;

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool Hidden { get; set; }

        /// <summary>
        /// 重定向
        /// </summary>
        public string Redirect { get; set; } = string.Empty;

        /// <summary>
        /// 组件路径
        /// </summary>
        public string Component { get; set; } = string.Empty;

        /// <summary>
        /// 一直显示
        /// </summary>
        public bool AlwaysShow { get; set; }

        /// <summary>
        /// 元数据
        /// </summary>
        public Meta Meta { get; set; } = new Meta();

        /// <summary>
        /// 子节点
        /// </summary>
        public List<VueRouterVo> Children { get; set; } = new List<VueRouterVo>();
    }

    /// <summary>
    /// 元数据
    /// </summary>
    public class Meta
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon { get; set; } = string.Empty;

        /// <summary>
        /// 是否缓存
        /// </summary>
        public bool NoCache { get; set; }

        /// <summary>
        /// 外链链接
        /// </summary>
        public string Link { get; set; } = string.Empty;
    }
}
